
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.dto.SoldierHouseholdRegistrationInfoBSearcher;
import com.insigma.business.qrcode.soldier.entity.SoldierHouseholdRegistrationInfoDO;
import com.insigma.business.qrcode.soldier.service.SoldierHouseholdRegistrationInfoService;
import com.insigma.business.qrcode.soldier.dao.SoldierHouseholdRegistrationInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierHouseholdRegistrationInfoService")
public class SoldierHouseholdRegistrationInfoServiceImpl implements SoldierHouseholdRegistrationInfoService {

    @Autowired(required = false)
    private SoldierHouseholdRegistrationInfoDao soldierHouseholdRegistrationInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierHouseholdRegistrationInfoDO> search(final SoldierHouseholdRegistrationInfoBSearcher soldierHouseholdRegistrationInfoBSearcher) {
        return soldierHouseholdRegistrationInfoDao.search(soldierHouseholdRegistrationInfoBSearcher);
    }
   
    @Override
    public SoldierHouseholdRegistrationInfoDO get(final String id){
        return soldierHouseholdRegistrationInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierHouseholdRegistrationInfoDO soldierHouseholdRegistrationInfoDO){
        soldierHouseholdRegistrationInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_HOUSEHOLD_REGISTRATION_INFO_ID));
        return soldierHouseholdRegistrationInfoDao.insert(soldierHouseholdRegistrationInfoDO);
    }

    
    @Override
    public Integer update(final SoldierHouseholdRegistrationInfoDO soldierHouseholdRegistrationInfoDO){
        return soldierHouseholdRegistrationInfoDao.update(soldierHouseholdRegistrationInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return soldierHouseholdRegistrationInfoDao.delete(id,modifierType,modifierId);
    }

}
